def write_geometric_series_to_file(filename):
    with open(filename, 'w') as f:
        total_sum = 0
        for n in range(1, 100):
            term = 1 / (2 ** n)
            total_sum += term
            
            equation = " + ".join([f"1/2^{i}" for i in range(1, n+1)])
            f.write(f"{equation} = {total_sum:.6f}\n")

write_geometric_series_to_file('geometric_series.txt')